#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    bool CheckPermutation(string s1, string s2) {
        int count1[26] = { 0 };
        int count2[26] = { 0 };

        for (auto c : s1)
        {
            count1[c - 'a']++;
        }
        for (auto c : s2)
        {
            count2[c - 'a']++;
        }
        for (int i = 0; i < 26; i++)
        {
            if (count1[i] != count2[i])
            {
                return false;
            }
        }
        return true;
    }
};